{% extends "base.html" %} {% block title %}优惠券管理{% end %}


{% block sub %}
<!--  START SUB NAV -->
    
    <!-- the class "active" is used to highlight the current/active linke -->
	<div id="subnav">
        <ul>
            <li><a href="/home/" >创建优惠券</a></li>
            <li><a href="/coupon/" class="active">优惠券管理</a></li>
        </ul>
    </div><!--  end div #subnav -->
    <!--  END SUB NAV -->    
{% end %}


{% block content %}
    
    <div id="primary_content">
        
        <h3>优惠券管理</h3>
        <p>所有优惠券.</p>
        <table class="tablesorter">
        <thead>
            <tr>
                <th>优惠券名称</th>
                <th>截至日期</th>
                <th>面额</th>
                <th>发放数量</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for c in coupons %}
            <tr>
                <td>{{ c['name'] }}</td>
                <td>{{ c['valid'] }}</td>
                <td>{{ c['amount'] }}</td>
                <td>{{ c['number'] }}</td>
                <td><a href="/coupon/view/{{ c['uid'] }}/">查看</a></td>
            </tr>
            {% end %}
        </tbody>
    </table>
    
    </div>

{% end %}